<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>FUI</title>

    <link rel="stylesheet" type="text/css" href="../theme/default/fui.all.css">

    <script src="../dev-lib/jhtmls.min.js"></script>
    <script src="../dev-lib/jquery-1.11.1.js"></script>
    <script src="../dev-lib/dev-define.js"></script>
    <script>
        inc.config({
            base: '../src'
        });
    </script>
    <script src="../dev-lib/exports.js"></script>
    <script src="../dev-lib/dev-start.js"></script>
    <script>
        window.onload = function () {

            var ibutton = new FUI.InputButton( {
                placeholder: "asdfasd",
                button: {
                    padding: '5px 3px',
                    icon: {
                        width: 10,
                        height: 10,
                        img: "assets/icon-demo/down.png"
                    }
                },
                input: {
                    value: '你好'
                }
            } );

            ibutton.appendTo( document.body );

            ibutton.on( "buttonclick", function ( e ) {

                console.log( e.type );

            } );

            ibutton.on( "inputcomplete", function ( e, info ) {

                console.log( e.type, info.value );

            } );

//            item.on( "click", function () {
//
//                console.log( this.getLabel() );
//
//                this.setLabel( 'nihao' );
//                this.setIcon( 'assets/icon/chrome.png' );
//
//            } );
//
//            item.on( "labelchange", function ( e, info ) {
//
//                console.log( e.type +", from: " + info.prevText + " to: " + info.currentText )
//
//            } );
//
//            item.on( "iconchange", function ( e, info ) {
//
//                console.log( e.type +", from: " + info.prevImage + " to: " + info.currentImage )
//
//            } );

        };
    </script>
</head>
<body>
    <h1>InputButton 示例</h1>
</body>
</html>